<%@ page language="java" contentType="text/html;UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="com.bear.model.entity.User"%>

<script>
function logout(){
	var a = $('#d');
	a.submit();
}

$(document).ready(function(){
	$.post("<c:url value="/userInfo/showmessagecount.html"/>",function(data,statusText)
			{
				$("#messagecount").html(data);
				
			},"html");
});
</script>

<%User someonelikeyou = (User)session.getAttribute("user"); 
	if(someonelikeyou!=null)
	{
%>
<div  style="float:right;" id="messagecount"></div>
<div style="float:right;">当前用户：<%=someonelikeyou.getUsername()%>
<a href="#" class="easyui-linkbutton" onclick="logout()">退出</a>
</div>

<%		
	}
%>
<form id="d" action="<c:url value="/forum/logout.html"/>">
</form>



